#include <stdio.h>
#include <stdlib.h>
#include <time.h>
void matrix_init(int a[], int n);
void show_temperatures(const int a[][24], int i);
int main(void)
{
    int temperatures[7][24];
    matrix_init(temperatures[0], 7 * 24);
    for (int (*p)[24] = temperatures; p < temperatures + 7; p++) {
        for (int *q = p[0]; q < p[0] + 24; q++)
            printf("%3d ", *q);
        printf("\n");
    }
    printf("\n");
    show_temperatures(temperatures, 2);
    return 0;
}
void matrix_init(int a[], int n) {
    srand((unsigned) time(NULL));
    for (int i = 0; i < n; i++)
        a[i] = rand() % 100;
}
void show_temperatures(const int a[][24], int i) {
    for (const int *p = a[i]; p < a[i] + 24; p++)
        printf("%3d ", *p);
    printf("\n");
}